<template>
    <div id="front_email">
		<vHead appPath="/email/inbox" appTitle="邮箱" >
            <div class="title-icon">
                <el-popover
                    placement="bottom-end"
                    width="380"
                    trigger="click">
                    <div class="email-tips">
                        <li>附件只存放一个月，超出系统会自动删除</li>
                        <li>编辑邮件每8分钟自动保存一次至草稿箱中（附件不保存）</li>
                        <li>手动保存会进行替换系统自动保存的邮件</li>
                        <li>发送会删除系统自动保存的邮件</li>
                    </div>
                    <el-button slot="reference" icon="el-icon-warning" circle title="提示" size="mini"></el-button>
                </el-popover>
            </div>
        </vHead>
        <main class="main">
            <router-view />
        </main>
        <vFoot/>
    </div>
</template>

<script>
import vHead from "@/components/common/header";
import vFoot from '@/components/common/footer';

export default {
    components: {
		vHead,
		vFoot
    },
    watch: {
        $route(to, from) {
            if (to.path === '/email/query' && from.path.indexOf('/email/mail-detail') > -1) {
                return;
            } else if (to.path.indexOf('/email/mail-detail') > -1) {
                return;
            } else {
                this.$store.commit('SET_QUERYSEARCH', null);
            }
        }
    },
    methods: {
        linkTo() {
            this.$router.push("/email/settings");
        }
    }
};
</script>

<style lang="scss">
    @import './../../../assets/email/css/email.css';
    .title-icon{
        text-align: right;
    }
    .email-tips {
        li {
            list-style-type: disc;
            line-height: 30px;
            font-size: 14px;
        }
    }
    .main {
        height: calc(100vh - 124px);
        overflow: hidden;

        .el-dialog__header {
            padding: 20px;
            background-color: #348EFC;

            span,
            button i {
                color: #fff;
            }
        }
    }
</style>